<?php
/**
 *      
 * 
 *  @author          Edmandie Samonte        (edmandie.samonte@gmail.com)
 *  @copyright       2011 
 * 
 */
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Profile</title>
        <style type="text/css">
            
            @import url(<?php echo load_css('common.css');?>);
            @import url(<?php echo load_css('header.css');?>);
            @import url(<?php echo load_css('logged_in.css');?>);
            @import url(<?php echo load_css('add.css');?>);
            
            .form-table .input{
                border:0;
            }
            
        </style>
        <style type="text/css" media="print">
            #right{
                display:none;
            }
            .main-container{
                width:700px;
            }
        </style>
    </head>
    <body>
        <div class="main-container">
            <?php require_once 'header.php';?>
             <span class="page-title"><?php echo $user->eFirstName;?>' Profile</span>
             <div class="post-head">
                <table >
                    <tr>
                        <td>
                            <img src="<?php echo load_image('profile_pic/'. $user->ePictureURL); ?>" title="" alt="" height="125"/>
                        </td>
                        <td style="width:20px"></td>
                        <td>
                            <span class="user_name"><?php echo $user->eFirstName . " " .$user->eMiddleName . " " . $user->eLastName; ?></span><br/>
                            <span class="user_position"><?php echo $position;?></span><br/>
                            <span class="user_id">ID# <?php echo str_pad($user->eID,4,"0",STR_PAD_LEFT);?></span>
                        </td>
                    </tr>
                </table>
            </div>
             <div class="clearfix">
                <div id="right">
                    <div class="navigation">
                    <div class="pane-title">Navigation</div>
                        <div class="controls">
                            <a href="<?php echo site_url('dashboard');?>">Dashboard</a><br/>
                            <a href="<?php echo site_url('employee/add'); ?>">Add Employee</a><br/>
                            <a href="<?php echo site_url('dashboard/logout'); ?>">Logout</a>
                        </div>
                    </div>
                    <div style="height:40px;"></div>
                    <div class="navigation">
                    <div class="pane-title"><?php echo $user->eFirstName;?>'s Navigation</div>
                        <div class="controls">
                            <a href="<?php echo current_url();?>" class="selected">Profile</a><br/>
                            <a href="<?php echo site_url('employee/attendance/' .$user->eID); ?>">Attendance Record</a><br/>
                            <a href="<?php echo site_url('employee/edit/'.$user->eID);?>">Edit Profile</a><br/>
                        </div>
                    </div>
                    
                </div>
                <div id="left">
                    <div class="pane-title">Personal Details</div>
                    <div style="width:550px;margin:0 auto;">
                        <table class="form-table">
                            <tr>
                                <td class="label">
                                    Full Name
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eFirstName . " " . $user->eMiddleName . " " . $user->eLastName;?></span> 
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Birthdate
                                </td>
                                <td>
                                    <span class="input"><?php echo date("M j, Y",strtotime($user->eBDate));?></span> 
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Address
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eAddress;?></span> 
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Gender
                                </td>
                                <td>
                                    <span class="input"><?php echo (($user->eGender == 'M') ? 'Male' : 'Female')?></span> 
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Skills
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eSkills?></span> 
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Work Status
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eStatus?></span> 
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="height: 40px;"></div>
                    <div class="pane-title">Contact Details</div>
                    <div style="width:550px;margin:0 auto;">
                        <table class="form-table">
                            <tr>
                                <td class="label">
                                    Contact Number
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eContactNumber;?></span>
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Email
                                </td>
                                <td>
                                    <span class="input"><?php echo $user->eEmail;?></span>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="height: 40px;"></div>
                    <div class="pane-title">Educational Background</div>
                    <div style="width:550px;margin:0 auto;">
                        <table class="form-table">
                            <?php foreach($educ as $e):?>
                            <tr>
                                <td class="label">
                                    <?php echo $e->eeLevel;?>
                                </td>
                                <td>
                                    <span class="school"><?php echo $e->eeSchool;?></span><br/>
                                    <span class="remarks"><?php echo $e->eeRemarks;?></span><br/>
                                    <span class="year"><?php echo $e->eeStartYear . " - " . $e->eeEndYear;?></span>
                                </td>
                            </tr>
                            <?php endforeach; ?>
                        </table>
                    </div>
                    <div style="height: 40px;"></div>
                    <div class="pane-title">Emergency Contact</div>
                    <div style="width:550px;margin:0 auto;">
                        <table class="form-table">
                            <tr>
                                <td class="label">
                                    
                                </td>
                                <td>
                                    <span class="school"><?php echo $contact->ecName;?></span><br/>
                                    <span class="remarks"><?php echo $contact->ecAddress?></span><br/>
                                    <span class="remarks"><?php echo $contact->ecContactNumber;?></span><br/>
                                    <span class="year"><?php echo $contact->ecRemark;?></span>
                                </td>
                            </tr>
                        </table>
                    </div>
                    
                </div>
            </div>
        </div>
    </body>
</html>
